<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	
	<title> Nibis </title>

	<link rel="stylesheet" type="text/css" href="css/styles.css">
	<link rel="stylesheet" type="text/css" href="creta/src/css/styles.css">
	<link rel="icon" type="image/png" href="icons/favicon.png">
	<link id="enumerate-lines" href="" rel="stylesheet" type="text/css">
	<script>
		MathJax = {
			tex: {inlineMath: [['$', '$']]}
		};
	</script>

</head>
<body onload="startEditors();load();" ondragstart="return false;" ondrop="return false;">
	<div id="noscript">
			<p>Good idea, it seems your browser can't run Javascript 🎉🎉</p>
			<p>You can still work with CLI desktop version <a href="https://notabug.org/alkeon/texdi">texdi</a></p>
	</div>
	<nav>
		<ul>
			<li> <a href="index.html" class="logo"><img alt="NIBIS logo" src="icons/logo.png"></a>
			<li class="smaller-title"> <div id="title"> Default Name </div>
			<li>
				<div class="submenu">
					<input id="input-menu" type="checkbox" onclick="start_menu()">
					<div>☰</div>
				</div>
			</li>
		</ul>
	</nav>
	<main id="viewport">
		<aside id="bookmarks">
			<h2> Titles </h2>
			<p class="bookmark-links"></p>
		</aside>
		<div id="editors">

			<div id="visual-editor"></div>
			<div id="code-editor"></div>

		</div>
		<section id="pdf"></section>
		<aside id="options">
			<details>
				<summary>Templates</summary>

				<input onclick="set_template_id(0)" type="radio" id="notes" name="templates" value="notes" checked>
				<label for="notes">Notes</label><br>
				<input onclick="set_template_id(1)" type="radio" id="thesis" name="templates" value="thesis">
				<label for="thesis">Thesis</label><br>
				<input onclick="set_template_id(2)" type="radio" id="presentation" name="templates" value="presentation">
				<label for="presentation">Presentation</label><br>
				<input onclick="set_template_id(3)" type="radio" id="paper" name="templates" value="paper">
				<label for="presentation">Paper</label><br>
				<input onclick="show_template_popup()" type="radio" id="custom" name="templates" value="custom">
				<label for="custom">Custom</label>
			</details>
			<details>
				<summary>Shortcuts (PC only)</summary>

				<p>Ctrl + Shift + C: Clean editor</p>
				<p>Ctrl + 1: First level header keybinding</p>
				<p>Ctrl + 2: Second level header keybinding</p>
				<p>Ctrl + 3: Third level header keybinding</p>
				<p>Ctrl + Shift + K: Link keybinding</p>
				<p>Ctrl + Shift + I: Image keybinding</p>
				<p>Ctrl + Shift + L: List keybinding</p>
				<p>Ctrl + 4: Nested list item</p>
				<p>Ctrl + Shift + T: Table keybinding</p>
				<p>Ctrl + Shift + B: Block keybinding</p>
				<p>Ctrl + Shift + E: Embed keybinding</p>
				<p>Ctrl + Shift + M: Code keybinding</p>
				<p>Alt + I: Enable/disable multiline editor. This option allows selecting multiple lines</p>

			</details>
			<p><a onclick="export_markdown()">Export to markdown</a></p>
			<p><input id="select-title" type="checkbox" onclick="show_bookmarks_aside()">Select titles</p>
			<p><input id="line-numbers" type="checkbox" onclick="set_line_numbering()">Add numbers to lines</p>
			<p><input id="set-collab" type="checkbox" onclick="set_collab()">Set collab mode</p>
			<p><input id="set-mathjax" type="checkbox" onclick="set_mathjax()">Render math formula (beta)</p>
			<p><input id="set-debug" type="checkbox" onclick="set_debug()">Show errors and debug</p>
			<p><input id="save-api" type="checkbox">Set API saving</p>
			<p><input id="api-token" type="text" placeholder="API Token"></p>
			<p><a href="about.html">About</a></p>
		</aside>
	</main>
	<div id="template-popup" class="popup">
		<br>
		<div class="popup-text">Write header and end for template</div>
		<div class="close_button" onclick="this.parentElement.style.display = 'none';">
			🗙
		</div>
		<textarea name="text" class="start" placeholder="Enter template start" rows="5" cols="5"></textarea>
		<textarea name="text" class="end" placeholder="Enter template end" rows="5" cols="5"></textarea>
		<button type="button" class="accept-template">Accept</button>
	</div>
	<div id="autoload-popup" class="popup">
		<br>
		<div class="popup_text">Load detected document?</div>
		<button type="button" class="accept-autoload">Yes</button>
		<button type="button" onclick="this.parentElement.style.display = 'none';">No</button>
	</div>
	<div id="loading-file-popup" class="popup">
		<br>
		<div class="close_button" onclick="this.parentElement.style.display = 'none';">
			🗙
		</div>
		<div class="popup_text"><img src="icons/loading.gif" alt="loading file icon"></div>
	</div>
	<script>
		
		document.getElementById('noscript').style.display = "none";
		
	</script>
	<script src="creta/src/js/creta-core.js"></script>
	<script src="creta/src/js/creta-ui.js"></script>
	<script src="creta/src/js/creta.js"></script>
	<script src="creta/src/js/beautify-html.js"></script>

	<script src="js/tedi/html2tedi.js"></script>
	<script src="js/tedi/tedi2lang.js"></script>
	<script src="js/tedi/tedi2html.js"></script>
	<script src="js/tedi/tedi2tex.js"></script>
	<script src="js/tedi/tedi2md.js"></script>
	
	<script src="js/editor.js"></script>
	<script src="js/ip.js"></script>
	<script src="js/jszip.min.js"></script>
	<script src="js/FileSaver.js"></script>
	
</body>
</html>
